﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using XDL.Framework.Particles;
using XDL.Framework;

namespace JumpNFight.Weapons
{
    class BFGWeaponSystem : BulletWeaponSystemBase
    {
        ParticleSystem m_trailPS;

        public BFGWeaponSystem(Game game) :
            base(game)
        { 
        }

        public override void Initialize()
        {
            m_trailPS = GameServices.GetService<ParticleSystem>("Particles/BFGTrail");
            base.Initialize();
        }

        protected override string BulletPSName
        {
            get { return "Particles/BFGBullet"; }
        }

        protected override string WeaponName
        {
            get { return "Weapons/BFG"; }
        }

        protected override int TrailCount
        {
            get
            {
                return 3;
            }
        }

        protected override ParticleSystem TrailParticleSystem
        {
            get
            {
                return m_trailPS;
            }
        }

        protected override bool Hit(Simulation.Intersection intersection, int tag, ref XDL.Framework.Particles.ParticleVertex particle, Vector3 position, Vector3 normalizedDirection, float distance)
        {
            base.Hit(intersection, tag, ref particle, position, normalizedDirection, distance);
            // traverse enemies!
            return true;
        }
    }
}
